package com.immortal.core.listener;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;
import org.springframework.security.web.session.HttpSessionCreatedEvent;
import org.springframework.stereotype.Component;

/**
 * <p>监听session创建对象
 *
 * @author wind
 * @version 1.0
 * @since 2018/12/20
 */
@Component
@Slf4j
class HttpSessionCreatedEventListener implements ApplicationListener<HttpSessionCreatedEvent> {

    @Override
    public void onApplicationEvent(HttpSessionCreatedEvent event) {
        log.info("new session:{}", event.getSession().getId());
    }
}